import {request} from "@@/exports";
import {DataCenterItem, StatisticsContract, StatisticsOverview} from "@/pages/dashboard/statistics/data";
import {UserListItem} from "@/pages/organization/user-list/data";

export async function statisticsOverview(
    params: {
    },
    options?: { [key: string]: any },
) {
    return request<{
        data: StatisticsOverview;
        /** 列表的内容总数 */
        success?: boolean;
    }>('/api/statistics/resource/overview', {
        method: 'GET',
        params: {
            ...params,
        },
        ...(options || {}),
    });
}

export async function statisticsDataCenterList(
    params: {
        // query
        /** 当前的页码 */
        current?: number;
        /** 页面的容量 */
        pageSize?: number;
    },
    options?: { [key: string]: any },
) {
    return request<{
        data: DataCenterItem[];
        /** 列表的内容总数 */
        total?: number;
        success?: boolean;
    }>('/api/statistics/dataCenter/list', {
        method: 'GET',
        params: {
            ...params,
        },
        ...(options || {}),
    });
}

export async function statisticsContract(
    params: {
    },
    options?: { [key: string]: any },
) {
    return request<{
        data: StatisticsContract;
        /** 列表的内容总数 */
        success?: boolean;
    }>('/api/statistics/contract/list', {
        method: 'GET',
        params: {
            ...params,
        },
        ...(options || {}),
    });
}


